package com.copyctrl.campus.portal.controller;

import com.copyctrl.campus.common.model.ApiResponse;
import com.copyctrl.campus.portal.service.AnnounceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:JH
 * @version:1.0
 */
@RestController
@RequestMapping("/announce")
public class AnnounceController {
    @Autowired
    AnnounceService service;

    @GetMapping("/all")
    public ApiResponse getAll(){
        return ApiResponse.ofSuccess(service.getAnnouncements());
    }
}
